<?php
if($folderList){
	$i=0;
	foreach ($folderList as $folder){
?>
<tr class="<?php echo ($i%2)?"odd":"event"?>">
	<td class="a-center first">
		<input type="checkbox" class="folder_item" name="folder_id[<?php echo $folder->id?>]" id="folder_id_<?php echo $folder->id?>" value="<?php echo $folder->id?>" />
	</td>
	<td class="a-left">
	<span class="product-type">
	
	<img src="<?php echo site_url();?>media/images/folder_icon.gif" /></span></td>
	<td colspan="5"><a class="folder-item" id="folder_<?php echo $folder->id ?>" href="#"><?php echo $folder->name?></a></td>
</tr>
<?php	
	$i++;	
	}
} 
?>
<?php
if($fileList){
	foreach ($fileList as $file){
?>
<tr class="first odd">
	<td class="a-center first">
		<input type="checkbox" name="file_id[<?php echo $file->id?>]" id="file_id_<?php echo $file->id?>" value="<?php echo $file->id?>" />
	</td>
	<td class="a-left">
	<span class="product-type">
	<?php
	if(in_array($file->extension, $fileIconList)){ 
	?>
		<img src="<?php echo site_url();?>media/images/<?php echo $file->extension?>.png" />
	<?php
	}else{
	?>
	<img src="<?php echo site_url();?>media/images/unknown.png" />
	<?php
	}
		 
	?>
	</span>
	</td>
	<td class="a-left"><a class="file-item" id="file_<?php echo $file->id ?>" href="#"><span class="product-name"><?php echo $file->name?></span></a></td>
	<td class="a-left"><?php echo $file->filesize?></td>
	<td class="a-left"><span class="t_download"><?php echo $file->download?></span></td>
	<td class="a-left last" colspan="2"><?php echo format_date($file->date_added)?></td>
</tr>
<?php		
	}
} 
?>

<?php
if(!$folderList && !$fileList){
?>
<tr>
	<td></td>
	<td colspan="4"><a class="folder" href="#"><?php echo lang('uploking_no_file_label')?></a></td>
</tr>
<?php
}
?>
